import { http } from '@/utils/http'
import type {
  searchListParams,
  searchSubListParams,
  baseMedicalDept,
  baseMedicalDeptSub,
} from '@/types/medicalDept'

export const getMedicalDeptList = (data: searchListParams) => {
  return http<baseMedicalDept[]>({
    method: 'POST',
    url: '/medical/dept/searchMedicalDeptList',
    data,
  })
}

export const getMedicalDeptSubList = (data: searchSubListParams) => {
  return http<baseMedicalDeptSub[]>({
    method: 'POST',
    url: '/medical/dept/sub/searchMedicalDeptSubList',
    data,
  })
}

export const getDeptAndSub = () => {
  return http<any>({
    method: 'GET',
    url: '/medical/dept/searchDeptAndSub',
  })
}
